import java.util.Scanner;

public class Lab05Task05 {
public static void main(String[] args) {
Scanner kb=new Scanner(System.in);
String str1,str2;
int k;
System.out.println("Enter a string1 of lengh <= 20:");
str1=kb.nextLine();
if(str1.length()<=20) {
System.out.println("Enter a string2 of lengh <= 20:");
str2=kb.nextLine();
if(str2.length()<=20) {
k=str1.compareTo(str2);
if(k>0) {
System.out.println("string1 is greater than string2");
}
else if(k<0) {
	System.out.println("string2 is greater than string1");
}
else {
	System.out.println("string1 and string2 are equal");
}
}
else {
System.err.print("Error: The lengh of string2 > 20");
}
}
else {
System.err.print("Error: The lengh of string1 > 20");
}
}
}
